package com.oocl.RTManageServer.responser.impl;

import java.io.IOException;
import java.io.OutputStream;

import org.jdom.Element;
import org.jdom.output.XMLOutputter;

import com.oocl.RTManageServer.responser.HttpResponser;

public class HttpResponserImpl implements HttpResponser{
	private OutputStream out;
	
	public HttpResponserImpl(OutputStream out) {
		this.out = out;
	}

	@Override
	public void response(Element root) throws IOException {
		out.write("HTTP/1.1 200 OK\r\n\r\n".getBytes());
		XMLOutputter outputter = new XMLOutputter();
		outputter.output(root, out);
	}

}
